package com.tomcov.client.view;


import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.PasswordTextBox;
import com.google.gwt.user.client.ui.TextBox;

public class WelcomViewImpl extends Composite implements WelcomView{
	
	@SuppressWarnings("unused")
	private Presenter presenter;
	private static final MyUiBinder binder = GWT.create(MyUiBinder.class);
	interface MyUiBinder extends UiBinder<FlowPanel, WelcomViewImpl> {
	}
	
	@UiField TextBox UsernameBox;
	@UiField PasswordTextBox PasswordBox;
	@UiField Button LoginButton,CreateUserButton;
	
	public WelcomViewImpl(){
		initWidget(binder.createAndBindUi(this));
	}

	@Override
	public String getUserName() {
		return UsernameBox.getText();
	}

	@Override
	public String getPassword() {
		return PasswordBox.getText();
	}

	public Button getLoginButton(){
		return LoginButton;
	}

	public Button getCreateUserButton(){
		return CreateUserButton;
	}


	@Override
	public void setPresenter(Presenter presenter) {
		this.presenter=presenter;
		
	}
}
